home *** CD-ROM | disk | FTP | other *** search
/ Electronics Boutique Catalog 1996 Spring / 1996 Electronics Boutique Spring CD-ROM (USA).bin / eb / demos / ewjdemo.dir / 00108.ls < prev    next >
Encoding:
Text File  |  1995-12-11  |  2.2 KB  |  98 lines

  1. global gMovieSprite, gMovieDuration, gReturnFrame
  2.  
  3. on startMovie
  4.   set gMovieSprite to 20
  5. end
  6.  
  7. on legalButton whichSprite
  8.   repeat while the stillDown
  9.     set gReturnFrame to marker(0)
  10.     return 1
  11.   end repeat
  12. end
  13.  
  14. on stopAllQT
  15.   repeat with x = 1 to 48
  16.     if the type of sprite x > 0 then
  17.       if the castType of cast the castNum of sprite x = #digitalVideo then
  18.         set the movieRate of sprite x to 0
  19.       end if
  20.     end if
  21.   end repeat
  22. end
  23.  
  24. on find whichCast, startFrame, endFrame
  25.   repeat with x = startFrame to endFrame
  26.     go(x)
  27.     repeat with y = 1 to 48
  28.       if the type of sprite y > 0 then
  29.         if the castNum of sprite y = whichCast then
  30.           put "Cast member " & whichCast & " was found in frame " & x & ", in channel " & y & "."
  31.         end if
  32.       end if
  33.     end repeat
  34.   end repeat
  35. end
  36.  
  37. on delayFor howLong
  38.   set howLong to the timer + howLong
  39.   repeat while the timer < howLong
  40.     updateStage()
  41.   end repeat
  42. end
  43.  
  44. on returnFrame whichFrame
  45.   stopAllQT()
  46.   set whichSprite to gMovieSprite + 1
  47.   puppetSound("ReturnB")
  48.   repeat with x = 1 to 2
  49.     set the castNum of sprite whichSprite to the number of cast "returnArrow0"
  50.     updateStage()
  51.     delayFor(15)
  52.     set the castNum of sprite whichSprite to the number of cast "returnArrow1"
  53.     updateStage()
  54.     delayFor(15)
  55.   end repeat
  56.   blackFrame()
  57.   go(whichFrame)
  58. end
  59.  
  60. on pressButton whichSprite, whichSound, whichHighlightCast, whichFrame
  61.   stopAllQT()
  62.   puppetSound(whichSound)
  63.   repeat with x = 1 to 2
  64.     set the castNum of sprite whichSprite to the number of cast "MOREBON.GIF"
  65.     set the castNum of sprite 7 to the number of cast "text0"
  66.     updateStage()
  67.     delayFor(15)
  68.     set the castNum of sprite whichSprite to the number of cast "MOREBOFF.GIF"
  69.     set the castNum of sprite 7 to the number of cast whichHighlightCast
  70.     updateStage()
  71.     delayFor(15)
  72.   end repeat
  73.   blackFrame()
  74.   go(whichFrame)
  75. end
  76.  
  77. on blackFrame
  78.   repeat with x = 1 to 48
  79.     set the locV of sprite x to -500
  80.   end repeat
  81.   puppetTransition(50, 0, 12)
  82.   updateStage()
  83.   puppetTransition(0)
  84. end
  85.  
  86. on checkIt
  87.   when keyDown then checkKey
  88.   repeat while not (the shiftDown)
  89.     updateStage()
  90.   end repeat
  91. end
  92.  
  93. on checkKey
  94.   set userKey to the key
  95.   set userKeyCode to the keyCode
  96.   put userKey, userKeyCode
  97. end
  98.